Page({

    data: {
        isTop: true,
        show: true,
        poster: 'https://swzfw1.jiaxing.gov.cn/WebImg/jiaxin/weidiaoyan-test.png'
    },

    onLoad(options) {

    },

    onHandlePoster(e) {
        console.log(e.detail.value);
    },

    onHandleClose(e) {
        console.log('outer', e.detail);
        this.setData({
            show: false
        })
    },

    onPageScroll(e) {
        const TO_TOP_MAX_DISTANCE = 225  //px
        if (e.scrollTop >= TO_TOP_MAX_DISTANCE) {
            if (!this.data.isTop) {
                return
            }
            this.setData({
                isTop: false
            })
        } else {
            if (this.data.isTop) {
                return
            }
            this.setData({
                isTop: true
            })
        }
    },

})